Skip to content

Conversation

@AlexeySachkov
Copy link
Contributor

We have two kinds of deprecations in our implementation:

  1. Functionality that is deprecated by the SYCL 2020 specification. It must still be supported and will only be removed in the future version of the standard. We can only remove it once we drop support for the SYCL 2020 standard all together;
  2. Functionality that is deprecated by us (some non-standard API accidentally made public for whichever reason, changes to extensions, etc.). Such functionality can be removed by us way quicker and it isn't tied to the SYCL 2020 standard;

By some reason, the macro which is intended to control warnings about the group (1) also controlled warnings about the group (2) and this patch fixes that.

SYCL2020_DISABLE_DEPRECATION_WARNINGS changed it so that it only control warnings from the group (1).

Warnings from the group (2) can only be disabled with a newly introduced internal macro __SYCL_DISABLE_DEPRECATION_WARNINGS which we need to reduce the noise from building libsycl.so and unit-tests for it which still can reference deprecated functionality from the group (2).

There is no user-visible macro provided for disabling warnings from the group (2). Anyone who wants to silence those warnings should use regular -Wno-deprecated-declarations.

We have two kinds of deprecations in our implementation:
1. Functionality that is deprecated by the SYCL 2020 specification. It
   must still be supported and will only be removed in the future
   version of the standard. We can only remove it once we drop support
   for the  SYCL 2020 standard all together;
2. Functionality that is deprecated by us (some non-standard API
   accidentally made public for whichever reason, changes to extensions,
   etc.). Such functionality can be removed by us way quicker and it
   isn't tied to the SYCL 2020 standard;

By some reason, the macro which is intended to control warnings about
the group (1) also controlled warnings about the group (2) and this
patch fixes that.

`SYCL2020_DISABLE_DEPRECATION_WARNINGS` changed it so that it **only**
control warnings from the group (1).

Warnings from the group (2) can only be disabled with a newly introduced
internal macro `__SYCL_DISABLE_DEPRECATION_WARNINGS` which we need to
reduce the noise from building `libsycl.so` and unit-tests for it which
still can reference deprecated functionality from the group (2).

There is no user-visible macro provided for disabling warnings from the
group (2). Anyone who wants to silence those warnings should use regular
`-Wno-deprecated-declarations`.
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no user-visible macro provided for disabling warnings from the group (2). Anyone who wants to silence those warnings should use regular -Wno-deprecated-declarations.

This might surprise some users, but I think this is a fair solution. I imagine some users will sniff out the new macro, but so be it.

@AlexeySachkov AlexeySachkov merged commit f722fcf into intel:sycl Sep 23, 2025
27 checks passed
@AlexeySachkov AlexeySachkov deleted the private/asachkov/fix-sycl-deprecated branch September 23, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants